package com.haiyangwang1.lesson12.bookSystem;

public class Book {
    int id;
    String name;
    int status; //0表示已经借出，1表示未借出
    int count;
    String time;
    //无参构造方法
    public Book() {
    }
//有参构造方法
    public Book(int id, String name, int status, int count, String time) {
        this.id = id;
        this.name = name;
        this.status = status;
        this.count = count;
        this.time = time;
    }
//get\set 快捷键 Alt+insert  ，或者鼠标点击右键  选择生成
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    //重写toString方法可以打印出数组里面的内容
    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", status=" + status +
                ", count=" + count +
                ", time='" + time + '\'' +
                '}';
    }
}
